// 用于server层请求后端接口数据
import type { HomeVideoPage, HomeVideoType } from '../home/model'
import type { VideoDetail, VideoDetailRes } from '../detail/model'
import http from '~/utils/http'

// 用于server层===>获取电影(电视剧/动漫/综艺)首页-推荐数据
export function getHomeVideoListForServer(params: HomeVideoPage) {
  return http.post<any>({
    url: '/video/home/getHomeList/forNode',
    body: params
  })
}

// 用于server层===>获取视频类型
export function getVideoTypeListForServer(params: HomeVideoType) {
  return http.post<any>({
    url: '/video/home/getVideoTypeList/forNode',
    body: params
  })
}

// 用于server层===>获取电影(电视剧/动漫/综艺)详情
export function getVideoDetailForServer(params: VideoDetail) {
  return http.post<VideoDetailRes>({
    url: '/video/home/getVideoDetailsById/forNode',
    body: params
  })
}
